﻿using System.Drawing;
using System.Windows.Forms;

namespace Streambolics.Gui
{
    public partial class TransparentUserControl : StandardUserControl
    {
        public TransparentUserControl ()
        {
            InitializeComponent ();
        }

        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams cp = base.CreateParams;
                cp.ExStyle |= 0x00000020;
                return cp;
            }
        }

        protected override void OnPaintBackground (PaintEventArgs e)
        {
        }

        protected void InvalidateEx ()
        {
            if (Parent == null)
                return;
            Rectangle rc = new Rectangle (this.Location, this.Size);
            Parent.Invalidate (rc, true);
        }

    }
}
